﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_GhiGiamTaiSan : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvTKChiPhi")]
        private ADVAccount _AdvTKChiPhi;
        [AccessedThroughProperty("AdvTKKhauHao")]
        private ADVAccount _AdvTKKhauHao;
        [AccessedThroughProperty("AdvTKNguyenGia")]
        private ADVAccount _AdvTKNguyenGia;
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTab3")]
        private C1DockingTab _C1DockingTab3;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("C1DockingTabPage3")]
        private C1DockingTabPage _C1DockingTabPage3;
        [AccessedThroughProperty("C1DockingTabPage4")]
        private C1DockingTabPage _C1DockingTabPage4;
        [AccessedThroughProperty("C1DockingTabPage5")]
        private C1DockingTabPage _C1DockingTabPage5;
        [AccessedThroughProperty("CboLoaiDuLieu")]
        private ComboBox _CboLoaiDuLieu;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CboLyDoGiam")]
        private ComboBox _CboLyDoGiam;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdAddRow")]
        private Button _CmdAddRow;
        [AccessedThroughProperty("CmdChuyen")]
        private Button _CmdChuyen;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdDelRow")]
        private Button _CmdDelRow;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdTimTaiSan")]
        private Button _CmdTimTaiSan;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label17")]
        private Label _Label17;
        [AccessedThroughProperty("Label18")]
        private Label _Label18;
        [AccessedThroughProperty("Label19")]
        private Label _Label19;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label20")]
        private Label _Label20;
        [AccessedThroughProperty("Label24")]
        private Label _Label24;
        [AccessedThroughProperty("Label27")]
        private Label _Label27;
        [AccessedThroughProperty("Label28")]
        private Label _Label28;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("Panel4")]
        private Panel _Panel4;
        [AccessedThroughProperty("PNDungChung")]
        private Panel _PNDungChung;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripButton2")]
        private ToolStripButton _ToolStripButton2;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtConLai")]
        private C1NumericEdit _TxtConLai;
        [AccessedThroughProperty("TxtDaKhauHao")]
        private C1NumericEdit _TxtDaKhauHao;
        [AccessedThroughProperty("TxtDienGiai")]
        private TextBox _TxtDienGiai;
        [AccessedThroughProperty("TxtMaTaiSan")]
        private TextBox _TxtMaTaiSan;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtNgayHoaDon")]
        private DateTimePicker _TxtNgayHoaDon;
        [AccessedThroughProperty("TxtNguyenGia")]
        private C1NumericEdit _TxtNguyenGia;
        [AccessedThroughProperty("TxtNguyenGiaNT")]
        private C1NumericEdit _TxtNguyenGiaNT;
        [AccessedThroughProperty("TxtSoChungTu")]
        private TextBox _TxtSoChungTu;
        [AccessedThroughProperty("TxtSoHieu")]
        private TextBox _TxtSoHieu;
        [AccessedThroughProperty("TxtTenTaiSan")]
        private TextBox _TxtTenTaiSan;
        [AccessedThroughProperty("TxtThoiGianSuDung")]
        private C1NumericEdit _TxtThoiGianSuDung;
        [AccessedThroughProperty("TxtTongNguyenGia")]
        private C1NumericEdit _TxtTongNguyenGia;
        [AccessedThroughProperty("txtTongNguyenGiaNT")]
        private C1NumericEdit _txtTongNguyenGiaNT;
        [AccessedThroughProperty("TxtTongThue")]
        private C1NumericEdit _TxtTongThue;
        [AccessedThroughProperty("TxtTongThueNT")]
        private C1NumericEdit _TxtTongThueNT;
        [AccessedThroughProperty("txtTriGiaKhauHao")]
        private C1NumericEdit _txtTriGiaKhauHao;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private string cFrmFormat;
        public string cFrmKhoa;
        public string cFrmKhoaTaiSan;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private string mLoaiChungTu;
        private FA_TangGiamTaiSanChiTiet objCTTTS;
        private clsSoChungTu objSoCT;
        private clsTaiSanCoDinh objTS;
        private FA_GhiTangGiamTaiSan objTTS;

        public Frm_GhiGiamTaiSan()
        {
            base.Load += new EventHandler(this.Frm_TangTaiSan_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmKhoaTaiSan = "";
            this.cFrmKhoa = "";
            this.cFrmTask = "";
            this.objTS = new clsTaiSanCoDinh();
            this.objTTS = new FA_GhiTangGiamTaiSan();
            this.objCTTTS = new FA_TangGiamTaiSanChiTiet();
            this.mLoaiChungTu = "TTSCD";
            this.objSoCT = new clsSoChungTu();
            this.InitializeComponent();
        }

        public void AddNguyenGia()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            string pValue = "";
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            vSlist.AddItem("");
            pValue = khoan.GetTaiKhoan("811");
            if (LVYModule.ReturnIfNull(pValue, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                khoan.Load(pValue);
                vSlist[vSlist.Rows.Count - 1, 1] = khoan.Khoa;
                vSlist[vSlist.Rows.Count - 1, 2] = khoan.SoTaiKhoan;
            }
            vSlist[vSlist.Rows.Count - 1, 5] = this.AdvTKNguyenGia.Value;
            vSlist[vSlist.Rows.Count - 1, 6] = this.AdvTKNguyenGia.CodeDisplay();
            double num = this.objTS.NguyenGia - this.objTS.DaKhauHao;
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            if (num2 == 0.0)
            {
                num2 = 1.0;
            }
            vSlist[vSlist.Rows.Count - 1, 7] = Math.Round((double) (num / num2), 0);
            vSlist[vSlist.Rows.Count - 1, 8] = num;
            vSlist[vSlist.Rows.Count - 1, 0x1f] = this.TxtDienGiai.Text.Trim() + ": " + modGeneral.Tranlated("Gi\x00e1 trị c\x00f2n lại", "") + ".";
            vSlist = null;
        }

        public void AddTriGiaDaKhauHao()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            vSlist.AddItem("");
            vSlist[vSlist.Rows.Count - 1, 1] = this.AdvTKKhauHao.Value;
            vSlist[vSlist.Rows.Count - 1, 2] = this.AdvTKKhauHao.CodeDisplay();
            vSlist[vSlist.Rows.Count - 1, 5] = this.AdvTKNguyenGia.Value;
            vSlist[vSlist.Rows.Count - 1, 6] = this.AdvTKNguyenGia.CodeDisplay();
            double daKhauHao = this.objTS.DaKhauHao;
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            if (num2 == 0.0)
            {
                num2 = 1.0;
            }
            vSlist[vSlist.Rows.Count - 1, 7] = Math.Round((double) (daKhauHao / num2), 0);
            vSlist[vSlist.Rows.Count - 1, 8] = daKhauHao;
            vSlist[vSlist.Rows.Count - 1, 0x1f] = this.TxtDienGiai.Text.Trim() + ": " + modGeneral.Tranlated("Gi\x00e1 trị đ\x00e3 hao m\x00f2n", "") + ".";
            vSlist = null;
        }

        private void C1DockingTab1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int num;
            int num3;
            switch (this.C1DockingTab1.SelectedIndex)
            {
                case 0:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                    vSlist.Cols[1].Visible = false;
                    vSlist.Cols[2].Visible = true;
                    vSlist.Cols[3].Visible = false;
                    vSlist.Cols[4].Visible = true;
                    vSlist.Cols[5].Visible = false;
                    vSlist.Cols[6].Visible = true;
                    vSlist.Cols[7].Visible = true;
                    vSlist.Cols[8].Visible = true;
                    vSlist.Cols[0x1f].Visible = true;
                    num = 9;
                    do
                    {
                        vSlist.Cols[num].Visible = false;
                        num++;
                        num3 = 30;
                    }
                    while (num <= num3);
                    vSlist.Select();
                    if (vSlist.Rows.Count != 1)
                    {
                        vSlist.Select(vSlist.Rows.Count - 1, 2);
                        vSlist = null;
                    }
                    break;
                }
                case 1:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid grid2 = this.VSlist;
                    num = 1;
                    do
                    {
                        grid2.Cols[num].Visible = false;
                        num++;
                        num3 = 9;
                    }
                    while (num <= num3);
                    grid2.Cols[10].Visible = true;
                    grid2.Cols[11].Visible = false;
                    grid2.Cols[12].Visible = true;
                    grid2.Cols[13].Visible = true;
                    grid2.Cols[14].Visible = false;
                    grid2.Cols[15].Visible = true;
                    grid2.Cols[0x10].Visible = true;
                    grid2.Cols[0x11].Visible = true;
                    grid2.Cols[0x12].Visible = false;
                    grid2.Cols[0x13].Visible = true;
                    grid2.Cols[20].Visible = true;
                    grid2.Cols[0x15].Visible = true;
                    grid2.Cols[0x16].Visible = true;
                    num = 0x17;
                    do
                    {
                        grid2.Cols[num].Visible = false;
                        num++;
                        num3 = 0x1f;
                    }
                    while (num <= num3);
                    grid2.Select();
                    if (this.VSlist.Rows.Count != 1)
                    {
                        grid2.Select(this.VSlist.Rows.Count - 1, 11);
                        grid2 = null;
                    }
                    break;
                }
                case 2:
                {
                    C1.Win.C1FlexGrid.C1FlexGrid grid3 = this.VSlist;
                    num = 1;
                    do
                    {
                        grid3.Cols[num].Visible = false;
                        num++;
                        num3 = 0x17;
                    }
                    while (num <= num3);
                    grid3.Cols[2].Visible = true;
                    grid3.Cols[4].Visible = false;
                    grid3.Cols[7].Visible = true;
                    grid3.Cols[8].Visible = true;
                    grid3.Cols[0x18].Visible = true;
                    grid3.Cols[0x19].Visible = false;
                    grid3.Cols[0x1a].Visible = true;
                    grid3.Cols[0x1b].Visible = false;
                    grid3.Cols[0x1c].Visible = true;
                    grid3.Cols[0x1d].Visible = false;
                    grid3.Cols[30].Visible = true;
                    grid3.Cols[0x1f].Visible = false;
                    grid3.Select();
                    if (this.VSlist.Rows.Count != 1)
                    {
                        grid3.Select(this.VSlist.Rows.Count - 1, 0x18);
                        grid3 = null;
                    }
                    break;
                }
            }
        }

        public bool CheckIvalid()
        {
            if (this.TxtDienGiai.Text == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập diễn giải chứng từ!", ""));
                this.TxtDienGiai.Focus();
                return false;
            }
            return this.CheckIvalidGrid();
        }

        public bool CheckIvalidGrid()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            if (this.VSlist.Rows.Count == 1)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập c\x00e1c d\x00f2ng ph\x00e1t sinh chi tiết!", ""));
                return false;
            }
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản nợ", ""));
                    return false;
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 5]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản c\x00f3", ""));
                    return false;
                }
                if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 7]), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số tiền ph\x00e1t sinh", ""));
                    return false;
                }
                khoan.Load(Conversions.ToString(this.VSlist[i, 1]));
                if (((khoan.CongNo == 1) & (((khoan.DoiTuongCungCap + khoan.DoiTuongKhachHang) + khoan.DoiTuongNhanVien) != 0)) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == ""))
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập đối tượng để ghi c\x00f4ng nợ!", "") + this.VSlist[i, 2].ToString().Trim());
                    return false;
                }
                if ((khoan.DoiTuongNganHang == 1) && (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == ""))
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập ng\x00e2n h\x00e0ng để ghi tồn quỹ!", "") + this.VSlist[i, 2].ToString().Trim());
                    return false;
                }
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if ((LVYModule.ReturnIfNull(this.cFrmKhoaTaiSan, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "") && !this.objTS.CheckGhiSoGiam(this.cFrmKhoaTaiSan))
            {
                this.cFrmKhoa = modGeneral.CreatKey("FA_ChungTuTangGiamTaiSan", 15, "TS");
                this.EnabledControl = true;
                this.objSoCT.Load(this.mLoaiChungTu);
                this.TxtSoChungTu.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), 1);
                if (modGeneral.H_LANGUAGE.Trim().ToUpper() == "VIET")
                {
                    this.TxtDienGiai.Text = modGeneral.Tranlated("Ghi giảm t\x00e0i sản", "") + ": " + this.objTS.TenViet;
                }
                else
                {
                    this.TxtDienGiai.Text = modGeneral.Tranlated("Ghi giảm t\x00e0i sản", "") + ": " + this.objTS.TenAnh;
                }
                this.AddNguyenGia();
                if (this.objTS.NguyenGia > this.objTS.DaKhauHao)
                {
                    this.AddTriGiaDaKhauHao();
                }
                this.TotalOfVoucher();
                this.cFrmTask = "I";
            }
        }

        private void CmdAddRow_Click(object sender, EventArgs e)
        {
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            if (!(((LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[vSlist.Rows.Count - 1, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "") | (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[vSlist.Rows.Count - 1, 5]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")) | (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[vSlist.Rows.Count - 1, 7]), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)))
            {
                vSlist.AddItem("");
                vSlist[vSlist.Rows.Count - 1, 0x1f] = this.TxtDienGiai.Text.Trim();
                vSlist.Select(vSlist.Rows.Count - 1, 2);
                vSlist.Focus();
                vSlist = null;
            }
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaTaiSan, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                if (this.objTS.DaSuDung(this.cFrmKhoaTaiSan))
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("T\x00e0i sản n\x00e0y đ\x00e3 đưa v\x00e0o sử dụng bạn kh\x00f4ng thể x\x00f3a!", ""));
                }
                else if (LVYModule.ConfirmDelete(""))
                {
                    this.objTTS.Delete(this.cFrmKhoaTaiSan);
                    this.EmptyData();
                    this.LoadDataTaiSan(this.cFrmKhoaTaiSan);
                    this.CmdEdit.Enabled = false;
                    this.CmdAdd.Enabled = true;
                }
            }
        }

        private void CmdDelRow_Click(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                this.VSlist.RemoveItem(this.VSlist.Row);
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaTaiSan, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.EnabledControl = true;
                this.cFrmTask = "U";
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdFind_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_GhiGiamTaiSanList.Show();
            MyProject.Forms.Frm_GhiGiamTaiSanList.BringToFront();
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                if (this.TxtSoChungTu.Text == "")
                {
                    this.objSoCT.Load(this.mLoaiChungTu);
                    this.TxtSoChungTu.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), 1);
                }
                if (this.SaveDetails())
                {
                    if (Conversions.ToBoolean(Microsoft.VisualBasic.CompilerServices.Operators.NotObject(this.UpdateData())))
                    {
                        this.objTTS.ClearTemp(this.cFrmKhoaTaiSan);
                    }
                    else
                    {
                        this.EnabledControl = false;
                        this.CmdAdd.Enabled = false;
                        this.CmdEdit.Enabled = true & this.mAllowEdit;
                        this.cFrmTask = "";
                    }
                }
            }
        }

        private void CmdTimTaiSan_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_SearchTaiSanCoDinh.Dispose();
            MyProject.Forms.Frm_SearchTaiSanCoDinh.objFrmCall = this;
            MyProject.Forms.Frm_SearchTaiSanCoDinh.ShowDialog();
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            this.EmptyData();
            this.EnabledControl = false;
            this.LoadDataTaiSan(this.cFrmKhoaTaiSan);
            if (this.cFrmTask == "I")
            {
                this.objSoCT.UndoVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6));
            }
            this.cFrmTask = "";
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.VSlist.Rows.Count = 1;
            this.TxtSoChungTu.Text = "";
            this.TxtDienGiai.Text = "";
        }

        public void FillDoiTuongThue(string pKhoaDT, int nRow)
        {
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            if (tuong.Load(pKhoaDT))
            {
                this.VSlist[nRow, 11] = tuong.Khoa;
                if (modGeneral.H_LANGUAGE == "VIET")
                {
                    this.VSlist[nRow, 12] = tuong.TenViet;
                }
                else
                {
                    this.VSlist[nRow, 12] = tuong.TenAnh;
                }
                this.VSlist[nRow, 13] = tuong.MaSoThue;
                this.VSlist[nRow, 14] = tuong.DiaChi;
            }
        }

        private void Frm_TangTaiSan_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
                BuildComboModule.BuildCombo(this.CboLyDoGiam, modGeneral.ListDanhMuc.LyDoTangTaiSan, false, " LoaiPhatSinh = 0 ", "");
                BuildComboModule.InitComboDatatype(this.CboLoaiDuLieu);
                this.EnabledControl = false;
                this.C1DockingTab1_SelectedIndexChanged(RuntimeHelpers.GetObjectValue(sender), e);
                if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.ShowData(this.cFrmKhoa);
                }
                else if (LVYModule.ReturnIfNull(this.cFrmKhoaTaiSan, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.LoadDataTaiSan(this.cFrmKhoaTaiSan);
                }
                else
                {
                    this.CmdAdd.Enabled = false;
                    this.CmdEdit.Enabled = false;
                }
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_GhiGiamTaiSan));
            this.TxtTongThueNT = new C1NumericEdit();
            this.TxtTongThue = new C1NumericEdit();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Label11 = new Label();
            this.TxtTongNguyenGia = new C1NumericEdit();
            this.txtTongNguyenGiaNT = new C1NumericEdit();
            this.Panel4 = new Panel();
            this.Label5 = new Label();
            this.TxtNgayHoaDon = new DateTimePicker();
            this.CmdDelRow = new Button();
            this.CmdAddRow = new Button();
            this.CboLyDoGiam = new ComboBox();
            this.Label12 = new Label();
            this.Label3 = new Label();
            this.TxtDienGiai = new TextBox();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Label1 = new Label();
            this.TxtSoChungTu = new TextBox();
            this.CmdPrint = new ToolStripButton();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdFind = new ToolStripButton();
            this.CmdExit = new ToolStripButton();
            this.ToolStripButton2 = new ToolStripButton();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdAdd = new ToolStripButton();
            this.CmdSave = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.Label8 = new Label();
            this.Label4 = new Label();
            this.TxtSoHieu = new TextBox();
            this.Label28 = new Label();
            this.Label27 = new Label();
            this.TxtThoiGianSuDung = new C1NumericEdit();
            this.txtTriGiaKhauHao = new C1NumericEdit();
            this.Label10 = new Label();
            this.PNDungChung = new Panel();
            this.CmdChuyen = new Button();
            this.CboLoaiDuLieu = new ComboBox();
            this.Label7 = new Label();
            this.TxtConLai = new C1NumericEdit();
            this.TxtDaKhauHao = new C1NumericEdit();
            this.Label24 = new Label();
            this.TxtNguyenGia = new C1NumericEdit();
            this.Label20 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label18 = new Label();
            this.Label19 = new Label();
            this.TxtNguyenGiaNT = new C1NumericEdit();
            this.Label17 = new Label();
            this.Label2 = new Label();
            this.TxtTenTaiSan = new TextBox();
            this.CmdTimTaiSan = new Button();
            this.Label6 = new Label();
            this.TxtMaTaiSan = new TextBox();
            this.Label9 = new Label();
            this.ToolStrip1 = new ToolStrip();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.C1DockingTabPage3 = new C1DockingTabPage();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage4 = new C1DockingTabPage();
            this.C1DockingTab3 = new C1DockingTab();
            this.C1DockingTabPage5 = new C1DockingTabPage();
            this.AdvTKChiPhi = new ADVAccount();
            this.AdvTKKhauHao = new ADVAccount();
            this.AdvTKNguyenGia = new ADVAccount();
            ((ISupportInitialize) this.TxtTongThueNT).BeginInit();
            ((ISupportInitialize) this.TxtTongThue).BeginInit();
            this.VSlist.BeginInit();
            ((ISupportInitialize) this.TxtTongNguyenGia).BeginInit();
            ((ISupportInitialize) this.txtTongNguyenGiaNT).BeginInit();
            this.Panel4.SuspendLayout();
            ((ISupportInitialize) this.TxtThoiGianSuDung).BeginInit();
            ((ISupportInitialize) this.txtTriGiaKhauHao).BeginInit();
            this.PNDungChung.SuspendLayout();
            ((ISupportInitialize) this.TxtConLai).BeginInit();
            ((ISupportInitialize) this.TxtDaKhauHao).BeginInit();
            ((ISupportInitialize) this.TxtNguyenGia).BeginInit();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            ((ISupportInitialize) this.TxtNguyenGiaNT).BeginInit();
            this.ToolStrip1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage4.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab3).BeginInit();
            this.C1DockingTab3.SuspendLayout();
            this.C1DockingTabPage5.SuspendLayout();
            this.SuspendLayout();
            this.TxtTongThueNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongThueNT.DataType = typeof(double);
            this.TxtTongThueNT.FormatType = FormatTypeEnum.StandardNumber;
            Point point = new Point(0x2a5, 0x1c);
            this.TxtTongThueNT.Location = point;
            this.TxtTongThueNT.Name = "TxtTongThueNT";
            Padding padding = new Padding(1);
            this.TxtTongThueNT.Padding = padding;
            this.TxtTongThueNT.ReadOnly = true;
            Size size = new Size(0x69, 20);
            this.TxtTongThueNT.Size = size;
            this.TxtTongThueNT.TabIndex = 0xa5;
            this.TxtTongThueNT.Tag = null;
            this.TxtTongThueNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTongThueNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongThueNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongThueNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongThue.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongThue.DataType = typeof(double);
            this.TxtTongThue.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x312, 0x1c);
            this.TxtTongThue.Location = point;
            this.TxtTongThue.Name = "TxtTongThue";
            padding = new Padding(1);
            this.TxtTongThue.Padding = padding;
            this.TxtTongThue.ReadOnly = true;
            size = new Size(100, 20);
            this.TxtTongThue.Size = size;
            this.TxtTongThue.TabIndex = 0xa6;
            this.TxtTongThue.Tag = null;
            this.TxtTongThue.TextAlign = HorizontalAlignment.Right;
            this.TxtTongThue.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongThue.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongThue.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0x137);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.Rows.MinSize = 20;
            size = new Size(0x374, 0xba);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x25;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(0x240, 0x1d);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x38, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0xa4;
            this.Label11.Text = "Tổng thuế";
            this.TxtTongNguyenGia.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongNguyenGia.DataType = typeof(double);
            this.TxtTongNguyenGia.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x312, 5);
            this.TxtTongNguyenGia.Location = point;
            this.TxtTongNguyenGia.Name = "TxtTongNguyenGia";
            padding = new Padding(1);
            this.TxtTongNguyenGia.Padding = padding;
            this.TxtTongNguyenGia.ReadOnly = true;
            size = new Size(100, 20);
            this.TxtTongNguyenGia.Size = size;
            this.TxtTongNguyenGia.TabIndex = 0xa3;
            this.TxtTongNguyenGia.Tag = null;
            this.TxtTongNguyenGia.TextAlign = HorizontalAlignment.Right;
            this.TxtTongNguyenGia.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongNguyenGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongNguyenGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTongNguyenGiaNT.BorderStyle = BorderStyle.FixedSingle;
            this.txtTongNguyenGiaNT.DataType = typeof(double);
            this.txtTongNguyenGiaNT.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x2a5, 5);
            this.txtTongNguyenGiaNT.Location = point;
            this.txtTongNguyenGiaNT.Name = "txtTongNguyenGiaNT";
            padding = new Padding(1);
            this.txtTongNguyenGiaNT.Padding = padding;
            this.txtTongNguyenGiaNT.ReadOnly = true;
            size = new Size(0x69, 20);
            this.txtTongNguyenGiaNT.Size = size;
            this.txtTongNguyenGiaNT.TabIndex = 0xa2;
            this.txtTongNguyenGiaNT.Tag = null;
            this.txtTongNguyenGiaNT.TextAlign = HorizontalAlignment.Right;
            this.txtTongNguyenGiaNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.txtTongNguyenGiaNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTongNguyenGiaNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Panel4.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel4.Controls.Add(this.TxtTongThue);
            this.Panel4.Controls.Add(this.TxtTongThueNT);
            this.Panel4.Controls.Add(this.Label11);
            this.Panel4.Controls.Add(this.TxtTongNguyenGia);
            this.Panel4.Controls.Add(this.txtTongNguyenGiaNT);
            this.Panel4.Controls.Add(this.Label5);
            this.Panel4.Controls.Add(this.TxtNgayHoaDon);
            this.Panel4.Controls.Add(this.CmdDelRow);
            this.Panel4.Controls.Add(this.CmdAddRow);
            this.Panel4.Dock = DockStyle.Bottom;
            point = new Point(0, 0x1f1);
            this.Panel4.Location = point;
            this.Panel4.Name = "Panel4";
            size = new Size(0x374, 0x33);
            this.Panel4.Size = size;
            this.Panel4.TabIndex = 0x26;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(0x240, 6);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x57, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0xa1;
            this.Label5.Text = "Tổng nguy\x00ean gi\x00e1";
            this.TxtNgayHoaDon.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0xa3);
            this.TxtNgayHoaDon.Format = DateTimePickerFormat.Short;
            point = new Point(220, 0x52);
            this.TxtNgayHoaDon.Location = point;
            this.TxtNgayHoaDon.Name = "TxtNgayHoaDon";
            size = new Size(0x54, 20);
            this.TxtNgayHoaDon.Size = size;
            this.TxtNgayHoaDon.TabIndex = 12;
            this.CmdDelRow.Image = (Image) manager.GetObject("CmdDelRow.Image");
            this.CmdDelRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(100, 6);
            this.CmdDelRow.Location = point;
            this.CmdDelRow.Name = "CmdDelRow";
            size = new Size(0x59, 0x18);
            this.CmdDelRow.Size = size;
            this.CmdDelRow.TabIndex = 12;
            this.CmdDelRow.Text = "&2.X\x00f3a d\x00f2ng";
            this.CmdDelRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdDelRow.UseVisualStyleBackColor = true;
            this.CmdAddRow.Image = (Image) manager.GetObject("CmdAddRow.Image");
            this.CmdAddRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(3, 6);
            this.CmdAddRow.Location = point;
            this.CmdAddRow.Name = "CmdAddRow";
            size = new Size(0x5c, 0x18);
            this.CmdAddRow.Size = size;
            this.CmdAddRow.TabIndex = 11;
            this.CmdAddRow.Text = "&1.Th\x00eam d\x00f2ng";
            this.CmdAddRow.TextImageRelation = TextImageRelation.ImageBeforeText;
            this.CmdAddRow.UseVisualStyleBackColor = true;
            this.CboLyDoGiam.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLyDoGiam.FormattingEnabled = true;
            point = new Point(0x21d, 9);
            this.CboLyDoGiam.Location = point;
            this.CboLyDoGiam.Name = "CboLyDoGiam";
            size = new Size(0x12d, 0x15);
            this.CboLyDoGiam.Size = size;
            this.CboLyDoGiam.TabIndex = 0x9f;
            this.Label12.AutoSize = true;
            this.Label12.BackColor = Color.Transparent;
            point = new Point(0x1ca, 12);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(0x3a, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 160;
            this.Label12.Text = "L\x00fd do giảm";
            this.Label12.TextAlign = ContentAlignment.TopRight;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(15, 0x23);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x30, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x7e;
            this.Label3.Text = "Diễn giải";
            point = new Point(0x63, 0x23);
            this.TxtDienGiai.Location = point;
            this.TxtDienGiai.Name = "TxtDienGiai";
            size = new Size(0x2e7, 20);
            this.TxtDienGiai.Size = size;
            this.TxtDienGiai.TabIndex = 0x7d;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(0x11, 11);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x20, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x7c;
            this.Label13.Text = "Ng\x00e0y";
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Custom;
            point = new Point(0x63, 9);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(100, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 0x7b;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0xd0, 13);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x41, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x7a;
            this.Label1.Text = "Số chứng từ";
            point = new Point(0x124, 10);
            this.TxtSoChungTu.Location = point;
            this.TxtSoChungTu.Name = "TxtSoChungTu";
            size = new Size(100, 20);
            this.TxtSoChungTu.Size = size;
            this.TxtSoChungTu.TabIndex = 0x79;
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x4d, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x3a, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.ToolStripButton2.Alignment = ToolStripItemAlignment.Right;
            this.ToolStripButton2.Image = (Image) manager.GetObject("ToolStripButton2.Image");
            this.ToolStripButton2.ImageScaling = ToolStripItemImageScaling.None;
            this.ToolStripButton2.ImageTransparentColor = Color.White;
            this.ToolStripButton2.Name = "ToolStripButton2";
            size = new Size(0x35, 0x16);
            this.ToolStripButton2.Size = size;
            this.ToolStripButton2.Text = "&Help";
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2f, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x61, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "Lập &chứng từ";
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2f, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x39, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.Label8.AutoSize = true;
            this.Label8.BackColor = Color.Transparent;
            point = new Point(20, 0x5c);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x45, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0xab;
            this.Label8.Text = "Đ\x00e3 khấu hao";
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            point = new Point(0x100, 13);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x2b, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0xa8;
            this.Label4.Text = "Số hiệu";
            point = new Point(0x157, 9);
            this.TxtSoHieu.Location = point;
            this.TxtSoHieu.Name = "TxtSoHieu";
            this.TxtSoHieu.ReadOnly = true;
            size = new Size(100, 20);
            this.TxtSoHieu.Size = size;
            this.TxtSoHieu.TabIndex = 0xa7;
            this.Label28.AutoEllipsis = true;
            this.Label28.AutoSize = true;
            this.Label28.BackColor = Color.Transparent;
            point = new Point(0x1d1, 0x5c);
            this.Label28.Location = point;
            this.Label28.Name = "Label28";
            this.Label28.RightToLeft = RightToLeft.No;
            size = new Size(0x3a, 13);
            this.Label28.Size = size;
            this.Label28.TabIndex = 0xa6;
            this.Label28.Text = "TK Chi ph\x00ed";
            this.Label28.TextAlign = ContentAlignment.TopRight;
            this.Label27.AutoEllipsis = true;
            this.Label27.AutoSize = true;
            this.Label27.BackColor = Color.Transparent;
            point = new Point(0x1d1, 0x42);
            this.Label27.Location = point;
            this.Label27.Name = "Label27";
            this.Label27.RightToLeft = RightToLeft.No;
            size = new Size(0x45, 13);
            this.Label27.Size = size;
            this.Label27.TabIndex = 0xa5;
            this.Label27.Text = "TK khấu hao";
            this.Label27.TextAlign = ContentAlignment.TopRight;
            this.TxtThoiGianSuDung.BorderStyle = BorderStyle.FixedSingle;
            this.TxtThoiGianSuDung.DataType = typeof(double);
            this.TxtThoiGianSuDung.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0xa7, 0x73);
            this.TxtThoiGianSuDung.Location = point;
            this.TxtThoiGianSuDung.Name = "TxtThoiGianSuDung";
            padding = new Padding(1);
            this.TxtThoiGianSuDung.Padding = padding;
            this.TxtThoiGianSuDung.ReadOnly = true;
            size = new Size(0x2c, 20);
            this.TxtThoiGianSuDung.Size = size;
            this.TxtThoiGianSuDung.TabIndex = 0xb1;
            this.TxtThoiGianSuDung.Tag = null;
            this.TxtThoiGianSuDung.TextAlign = HorizontalAlignment.Right;
            this.TxtThoiGianSuDung.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtThoiGianSuDung.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtThoiGianSuDung.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTriGiaKhauHao.BorderStyle = BorderStyle.FixedSingle;
            this.txtTriGiaKhauHao.DataType = typeof(double);
            this.txtTriGiaKhauHao.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x157, 0x73);
            this.txtTriGiaKhauHao.Location = point;
            this.txtTriGiaKhauHao.Name = "txtTriGiaKhauHao";
            padding = new Padding(1);
            this.txtTriGiaKhauHao.Padding = padding;
            this.txtTriGiaKhauHao.ReadOnly = true;
            size = new Size(100, 20);
            this.txtTriGiaKhauHao.Size = size;
            this.txtTriGiaKhauHao.TabIndex = 0xb2;
            this.txtTriGiaKhauHao.Tag = null;
            this.txtTriGiaKhauHao.TextAlign = HorizontalAlignment.Right;
            this.txtTriGiaKhauHao.VisibleButtons = DropDownControlButtonFlags.None;
            this.txtTriGiaKhauHao.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTriGiaKhauHao.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(20, 0x76);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x80, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 0xb0;
            this.Label10.Text = "Thời gian sử dụng (th\x00e1ng)";
            this.PNDungChung.Controls.Add(this.CmdChuyen);
            this.PNDungChung.Controls.Add(this.CboLoaiDuLieu);
            point = new Point(0x23e, 0x70);
            this.PNDungChung.Location = point;
            this.PNDungChung.Name = "PNDungChung";
            size = new Size(0x117, 0x18);
            this.PNDungChung.Size = size;
            this.PNDungChung.TabIndex = 0xb5;
            this.PNDungChung.Visible = false;
            this.CmdChuyen.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            point = new Point(0xfd, 0);
            this.CmdChuyen.Location = point;
            this.CmdChuyen.Name = "CmdChuyen";
            size = new Size(0x18, 0x17);
            this.CmdChuyen.Size = size;
            this.CmdChuyen.TabIndex = 14;
            this.CmdChuyen.Text = ">";
            this.CmdChuyen.UseVisualStyleBackColor = true;
            this.CboLoaiDuLieu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiDuLieu.FormattingEnabled = true;
            point = new Point(90, 1);
            this.CboLoaiDuLieu.Location = point;
            this.CboLoaiDuLieu.Name = "CboLoaiDuLieu";
            size = new Size(0xa3, 0x15);
            this.CboLoaiDuLieu.Size = size;
            this.CboLoaiDuLieu.TabIndex = 13;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            point = new Point(0x100, 0x5f);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x27, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0xaf;
            this.Label7.Text = "C\x00f2n lại";
            this.TxtConLai.BorderStyle = BorderStyle.FixedSingle;
            this.TxtConLai.DataType = typeof(double);
            this.TxtConLai.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x157, 0x59);
            this.TxtConLai.Location = point;
            this.TxtConLai.Name = "TxtConLai";
            padding = new Padding(1);
            this.TxtConLai.Padding = padding;
            this.TxtConLai.ReadOnly = true;
            size = new Size(100, 20);
            this.TxtConLai.Size = size;
            this.TxtConLai.TabIndex = 0xae;
            this.TxtConLai.Tag = null;
            this.TxtConLai.TextAlign = HorizontalAlignment.Right;
            this.TxtConLai.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtConLai.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtConLai.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtDaKhauHao.BorderStyle = BorderStyle.FixedSingle;
            this.TxtDaKhauHao.DataType = typeof(double);
            this.TxtDaKhauHao.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x6a, 0x59);
            this.TxtDaKhauHao.Location = point;
            this.TxtDaKhauHao.Name = "TxtDaKhauHao";
            padding = new Padding(1);
            this.TxtDaKhauHao.Padding = padding;
            this.TxtDaKhauHao.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtDaKhauHao.Size = size;
            this.TxtDaKhauHao.TabIndex = 0xac;
            this.TxtDaKhauHao.Tag = null;
            this.TxtDaKhauHao.TextAlign = HorizontalAlignment.Right;
            this.TxtDaKhauHao.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtDaKhauHao.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtDaKhauHao.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label24.AutoEllipsis = true;
            this.Label24.AutoSize = true;
            this.Label24.BackColor = Color.Transparent;
            point = new Point(0x1d1, 0x27);
            this.Label24.Location = point;
            this.Label24.Name = "Label24";
            this.Label24.RightToLeft = RightToLeft.No;
            size = new Size(0x4c, 13);
            this.Label24.Size = size;
            this.Label24.TabIndex = 0xa4;
            this.Label24.Text = "TK nguy\x00ean gi\x00e1";
            this.Label24.TextAlign = ContentAlignment.TopRight;
            this.TxtNguyenGia.BorderStyle = BorderStyle.FixedSingle;
            this.TxtNguyenGia.DataType = typeof(double);
            this.TxtNguyenGia.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x157, 0x3f);
            this.TxtNguyenGia.Location = point;
            this.TxtNguyenGia.Name = "TxtNguyenGia";
            padding = new Padding(1);
            this.TxtNguyenGia.Padding = padding;
            this.TxtNguyenGia.ReadOnly = true;
            size = new Size(100, 20);
            this.TxtNguyenGia.Size = size;
            this.TxtNguyenGia.TabIndex = 160;
            this.TxtNguyenGia.Tag = null;
            this.TxtNguyenGia.TextAlign = HorizontalAlignment.Right;
            this.TxtNguyenGia.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtNguyenGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtNguyenGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label20.AutoSize = true;
            this.Label20.BackColor = Color.Transparent;
            point = new Point(0x100, 0x44);
            this.Label20.Location = point;
            this.Label20.Name = "Label20";
            size = new Size(0x2c, 13);
            this.Label20.Size = size;
            this.Label20.TabIndex = 0x9f;
            this.Label20.Text = "Quy đổi";
            this.CboLoaiTien.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTien.Enabled = false;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x6a, 0x23);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x69, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 0x9b;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.Enabled = false;
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x157, 0x25);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            padding = new Padding(1);
            this.txtTyGia.Padding = padding;
            size = new Size(0x65, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 0x9c;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.txtTyGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.txtTyGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label18.AutoSize = true;
            this.Label18.BackColor = Color.Transparent;
            point = new Point(0x16, 0x26);
            this.Label18.Location = point;
            this.Label18.Name = "Label18";
            size = new Size(0x2f, 13);
            this.Label18.Size = size;
            this.Label18.TabIndex = 0x9e;
            this.Label18.Text = "Loại tiền";
            this.Label18.TextAlign = ContentAlignment.TopRight;
            this.Label19.AutoSize = true;
            this.Label19.BackColor = Color.Transparent;
            point = new Point(0x100, 0x29);
            this.Label19.Location = point;
            this.Label19.Name = "Label19";
            size = new Size(0x24, 13);
            this.Label19.Size = size;
            this.Label19.TabIndex = 0x9d;
            this.Label19.Text = "Tỷ gi\x00e1";
            this.Label19.TextAlign = ContentAlignment.TopRight;
            this.TxtNguyenGiaNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtNguyenGiaNT.DataType = typeof(double);
            this.TxtNguyenGiaNT.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x6a, 0x3f);
            this.TxtNguyenGiaNT.Location = point;
            this.TxtNguyenGiaNT.Name = "TxtNguyenGiaNT";
            padding = new Padding(1);
            this.TxtNguyenGiaNT.Padding = padding;
            this.TxtNguyenGiaNT.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtNguyenGiaNT.Size = size;
            this.TxtNguyenGiaNT.TabIndex = 0x9a;
            this.TxtNguyenGiaNT.Tag = null;
            this.TxtNguyenGiaNT.TextAlign = HorizontalAlignment.Right;
            this.TxtNguyenGiaNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtNguyenGiaNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtNguyenGiaNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label17.AutoSize = true;
            this.Label17.BackColor = Color.Transparent;
            point = new Point(20, 0x42);
            this.Label17.Location = point;
            this.Label17.Name = "Label17";
            size = new Size(0x3d, 13);
            this.Label17.Size = size;
            this.Label17.TabIndex = 0x99;
            this.Label17.Text = "Nguy\x00ean gi\x00e1";
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x1d0, 12);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(60, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x6b;
            this.Label2.Text = "T\x00ean t\x00e0i sản";
            point = new Point(0x224, 9);
            this.TxtTenTaiSan.Location = point;
            this.TxtTenTaiSan.Name = "TxtTenTaiSan";
            this.TxtTenTaiSan.ReadOnly = true;
            size = new Size(0x12d, 20);
            this.TxtTenTaiSan.Size = size;
            this.TxtTenTaiSan.TabIndex = 0x6a;
            this.CmdTimTaiSan.BackgroundImage = ACCOUNTING.My.Resources.Resources.view;
            this.CmdTimTaiSan.BackgroundImageLayout = ImageLayout.Stretch;
            this.CmdTimTaiSan.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xa3);
            point = new Point(0xd3, 8);
            this.CmdTimTaiSan.Location = point;
            this.CmdTimTaiSan.Name = "CmdTimTaiSan";
            size = new Size(0x16, 0x16);
            this.CmdTimTaiSan.Size = size;
            this.CmdTimTaiSan.TabIndex = 0x69;
            this.CmdTimTaiSan.UseVisualStyleBackColor = true;
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            point = new Point(0x13, 12);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x38, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x68;
            this.Label6.Text = "M\x00e3 t\x00e0i sản";
            point = new Point(0x6a, 9);
            this.TxtMaTaiSan.Location = point;
            this.TxtMaTaiSan.Name = "TxtMaTaiSan";
            this.TxtMaTaiSan.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtMaTaiSan.Size = size;
            this.TxtMaTaiSan.TabIndex = 0x67;
            this.Label9.AutoSize = true;
            this.Label9.BackColor = Color.Transparent;
            point = new Point(0xff, 0x79);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            size = new Size(0x55, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0xb3;
            this.Label9.Text = "Khấu hao/th\x00e1ng";
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.ToolStripButton2 });
            point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            size = new Size(0x374, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x21;
            this.ToolStrip1.Text = "ToolStrip1";
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage3);
            this.C1DockingTab1.Dock = DockStyle.Top;
            point = new Point(0, 0x11e);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x374, 0x19);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0x27;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x372, 0);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Định khoản";
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x372, 0);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 1;
            this.C1DockingTabPage2.Text = "Th\x00f4ng tin thuế";
            this.C1DockingTabPage3.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage3.Location = point;
            this.C1DockingTabPage3.Name = "C1DockingTabPage3";
            size = new Size(0x372, 0);
            this.C1DockingTabPage3.Size = size;
            this.C1DockingTabPage3.TabIndex = 2;
            this.C1DockingTabPage3.Text = "Th\x00f4ng tin gi\x00e1 th\x00e0nh";
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage4);
            this.C1DockingTab2.Dock = DockStyle.Top;
            point = new Point(0, 0x74);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            size = new Size(0x374, 170);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 40;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage4.Controls.Add(this.PNDungChung);
            this.C1DockingTabPage4.Controls.Add(this.Label6);
            this.C1DockingTabPage4.Controls.Add(this.txtTriGiaKhauHao);
            this.C1DockingTabPage4.Controls.Add(this.Label9);
            this.C1DockingTabPage4.Controls.Add(this.TxtThoiGianSuDung);
            this.C1DockingTabPage4.Controls.Add(this.TxtMaTaiSan);
            this.C1DockingTabPage4.Controls.Add(this.Label10);
            this.C1DockingTabPage4.Controls.Add(this.CmdTimTaiSan);
            this.C1DockingTabPage4.Controls.Add(this.Label7);
            this.C1DockingTabPage4.Controls.Add(this.TxtTenTaiSan);
            this.C1DockingTabPage4.Controls.Add(this.TxtConLai);
            this.C1DockingTabPage4.Controls.Add(this.Label2);
            this.C1DockingTabPage4.Controls.Add(this.TxtDaKhauHao);
            this.C1DockingTabPage4.Controls.Add(this.Label17);
            this.C1DockingTabPage4.Controls.Add(this.Label8);
            this.C1DockingTabPage4.Controls.Add(this.TxtNguyenGiaNT);
            this.C1DockingTabPage4.Controls.Add(this.Label4);
            this.C1DockingTabPage4.Controls.Add(this.Label19);
            this.C1DockingTabPage4.Controls.Add(this.TxtSoHieu);
            this.C1DockingTabPage4.Controls.Add(this.Label18);
            this.C1DockingTabPage4.Controls.Add(this.AdvTKChiPhi);
            this.C1DockingTabPage4.Controls.Add(this.txtTyGia);
            this.C1DockingTabPage4.Controls.Add(this.AdvTKKhauHao);
            this.C1DockingTabPage4.Controls.Add(this.CboLoaiTien);
            this.C1DockingTabPage4.Controls.Add(this.AdvTKNguyenGia);
            this.C1DockingTabPage4.Controls.Add(this.Label20);
            this.C1DockingTabPage4.Controls.Add(this.Label28);
            this.C1DockingTabPage4.Controls.Add(this.TxtNguyenGia);
            this.C1DockingTabPage4.Controls.Add(this.Label27);
            this.C1DockingTabPage4.Controls.Add(this.Label24);
            this.C1DockingTabPage4.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage4.Location = point;
            this.C1DockingTabPage4.Name = "C1DockingTabPage4";
            size = new Size(0x372, 0x90);
            this.C1DockingTabPage4.Size = size;
            this.C1DockingTabPage4.TabIndex = 0;
            this.C1DockingTabPage4.Text = "Th\x00f4ng tin t\x00e0i sản";
            this.C1DockingTab3.Controls.Add(this.C1DockingTabPage5);
            this.C1DockingTab3.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.C1DockingTab3.Location = point;
            this.C1DockingTab3.Name = "C1DockingTab3";
            size = new Size(0x374, 0x5b);
            this.C1DockingTab3.Size = size;
            this.C1DockingTab3.TabIndex = 0x29;
            this.C1DockingTab3.TabsSpacing = 5;
            this.C1DockingTab3.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab3.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab3.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage5.Controls.Add(this.CboLyDoGiam);
            this.C1DockingTabPage5.Controls.Add(this.Label12);
            this.C1DockingTabPage5.Controls.Add(this.TxtSoChungTu);
            this.C1DockingTabPage5.Controls.Add(this.Label3);
            this.C1DockingTabPage5.Controls.Add(this.Label1);
            this.C1DockingTabPage5.Controls.Add(this.TxtDienGiai);
            this.C1DockingTabPage5.Controls.Add(this.TxtNgayChungTu);
            this.C1DockingTabPage5.Controls.Add(this.Label13);
            this.C1DockingTabPage5.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage5.Location = point;
            this.C1DockingTabPage5.Name = "C1DockingTabPage5";
            size = new Size(0x372, 0x41);
            this.C1DockingTabPage5.Size = size;
            this.C1DockingTabPage5.TabIndex = 0;
            this.C1DockingTabPage5.Text = "Th\x00f4ng tin chứng từ";
            this.AdvTKChiPhi.Conditions = "";
            this.AdvTKChiPhi.DefaultValue = "";
            this.AdvTKChiPhi.FieldNameFilter = "Left(SoTaiKhoan,1)";
            this.AdvTKChiPhi.KeyFilter = "6";
            point = new Point(0x224, 0x59);
            this.AdvTKChiPhi.Location = point;
            padding = new Padding(0);
            this.AdvTKChiPhi.Margin = padding;
            this.AdvTKChiPhi.Name = "AdvTKChiPhi";
            this.AdvTKChiPhi.OnlyDigit = false;
            this.AdvTKChiPhi.ReadOnly = true;
            size = new Size(0x12d, 20);
            this.AdvTKChiPhi.Size = size;
            this.AdvTKChiPhi.TabIndex = 0xa3;
            this.AdvTKChiPhi.UpperText = true;
            this.AdvTKChiPhi.Value = "";
            this.AdvTKChiPhi.WithCode = 80;
            this.AdvTKKhauHao.Conditions = "";
            this.AdvTKKhauHao.DefaultValue = "";
            this.AdvTKKhauHao.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKKhauHao.KeyFilter = "214";
            point = new Point(0x224, 0x3f);
            this.AdvTKKhauHao.Location = point;
            padding = new Padding(0);
            this.AdvTKKhauHao.Margin = padding;
            this.AdvTKKhauHao.Name = "AdvTKKhauHao";
            this.AdvTKKhauHao.OnlyDigit = false;
            this.AdvTKKhauHao.ReadOnly = true;
            size = new Size(0x12d, 20);
            this.AdvTKKhauHao.Size = size;
            this.AdvTKKhauHao.TabIndex = 0xa2;
            this.AdvTKKhauHao.UpperText = true;
            this.AdvTKKhauHao.Value = "";
            this.AdvTKKhauHao.WithCode = 80;
            this.AdvTKNguyenGia.Conditions = "";
            this.AdvTKNguyenGia.DefaultValue = "";
            this.AdvTKNguyenGia.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKNguyenGia.KeyFilter = "211";
            point = new Point(0x224, 0x24);
            this.AdvTKNguyenGia.Location = point;
            padding = new Padding(0);
            this.AdvTKNguyenGia.Margin = padding;
            this.AdvTKNguyenGia.Name = "AdvTKNguyenGia";
            this.AdvTKNguyenGia.OnlyDigit = false;
            this.AdvTKNguyenGia.ReadOnly = true;
            size = new Size(0x12d, 20);
            this.AdvTKNguyenGia.Size = size;
            this.AdvTKNguyenGia.TabIndex = 0xa1;
            this.AdvTKNguyenGia.UpperText = true;
            this.AdvTKNguyenGia.Value = "";
            this.AdvTKNguyenGia.WithCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x374, 0x224);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.C1DockingTab2);
            this.Controls.Add(this.C1DockingTab3);
            this.Controls.Add(this.Panel4);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.Name = "Frm_GhiGiamTaiSan";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "NV-0015";
            this.Text = "GHI GIAM TAI SAN";
            ((ISupportInitialize) this.TxtTongThueNT).EndInit();
            ((ISupportInitialize) this.TxtTongThue).EndInit();
            this.VSlist.EndInit();
            ((ISupportInitialize) this.TxtTongNguyenGia).EndInit();
            ((ISupportInitialize) this.txtTongNguyenGiaNT).EndInit();
            this.Panel4.ResumeLayout(false);
            this.Panel4.PerformLayout();
            ((ISupportInitialize) this.TxtThoiGianSuDung).EndInit();
            ((ISupportInitialize) this.txtTriGiaKhauHao).EndInit();
            this.PNDungChung.ResumeLayout(false);
            ((ISupportInitialize) this.TxtConLai).EndInit();
            ((ISupportInitialize) this.TxtDaKhauHao).EndInit();
            ((ISupportInitialize) this.TxtNguyenGia).EndInit();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            ((ISupportInitialize) this.TxtNguyenGiaNT).EndInit();
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage4.ResumeLayout(false);
            this.C1DockingTabPage4.PerformLayout();
            ((ISupportInitialize) this.C1DockingTab3).EndInit();
            this.C1DockingTab3.ResumeLayout(false);
            this.C1DockingTabPage5.ResumeLayout(false);
            this.C1DockingTabPage5.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void InsertFixedAsset(string pKhoa)
        {
            this.cFrmKhoaTaiSan = pKhoa;
            this.LoadDataTaiSan(pKhoa);
        }

        public void LoadDataTaiSan(object pKhoaTaiSan)
        {
            this.objTS.Load(Conversions.ToString(pKhoaTaiSan));
            this.TxtMaTaiSan.Text = this.objTS.Ma;
            this.TxtSoHieu.Text = this.objTS.SoHieuTaiSan;
            this.CboLoaiTien.SelectedValue = this.objTS.LoaiTien;
            this.txtTyGia.Value = this.objTS.TyGia;
            if (modGeneral.H_LANGUAGE.ToUpper().Trim() == "VIET")
            {
                this.TxtTenTaiSan.Text = this.objTS.TenViet;
            }
            else
            {
                this.TxtTenTaiSan.Text = this.objTS.TenAnh;
            }
            this.TxtNguyenGia.Value = this.objTS.NguyenGia;
            this.TxtNguyenGiaNT.Value = this.objTS.NguyenGiaNT;
            this.TxtDaKhauHao.Value = this.objTS.DaKhauHao;
            this.TxtConLai.Value = this.objTS.GiaTriConLai;
            this.TxtThoiGianSuDung.Value = this.objTS.ThoiGianSuDung;
            this.txtTriGiaKhauHao.Value = this.objTS.TriGiaKhauHao;
            this.AdvTKNguyenGia.Value = this.objTS.KhoaTKNguyenGia;
            this.AdvTKChiPhi.Value = this.objTS.KhoaTKChiPhi;
            this.AdvTKKhauHao.Value = this.objTS.KhoaTKKhauHao;
            if (this.objTTS.LoadByTaiSan(Conversions.ToString(pKhoaTaiSan), 0))
            {
                this.cFrmKhoa = this.objTTS.Khoa;
                this.TxtSoChungTu.Text = this.objTTS.SoChungTu;
                this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objTTS.NgayChungTu);
                this.TxtDienGiai.Text = this.objTTS.DienGiai;
                this.CboLyDoGiam.SelectedValue = RuntimeHelpers.GetObjectValue(this.objTTS.KhoaLyDo);
                this.CboLoaiDuLieu.SelectedValue = this.objTTS.DuLieu;
                this.LoadDetails(this.cFrmKhoa);
                this.CmdAdd.Enabled = false;
                this.CmdEdit.Enabled = true & this.mAllowEdit;
            }
            else
            {
                this.CmdAdd.Enabled = true & this.mAllowAdd;
                this.CmdEdit.Enabled = false;
            }
        }

        public void LoadDetails(string pKhoa)
        {
            DataTable details = this.objTTS.GetDetails(pKhoa);
            if (details != null)
            {
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                vSlist.Rows.Count = 1;
                int num2 = details.Rows.Count - 1;
                for (int i = 0; i <= num2; i++)
                {
                    vSlist.AddItem("");
                    vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(details.Rows[i]["Khoa"]);
                    vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaTaiKhoanNo"]);
                    vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TaiKhoanNo"]);
                    vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaTaiKhoanCo"]);
                    vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TaiKhoanCo"]);
                    vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaDoiTuong"]);
                    vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(details.Rows[i]["DoiTuong"]);
                    vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoTienNT"]);
                    vSlist[vSlist.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoTien"]);
                    vSlist[vSlist.Rows.Count - 1, 9] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaTaiKhoanThue"]);
                    vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TaiKhoanThue"]);
                    vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaDoiTuongThue"]);
                    vSlist[vSlist.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TenDoiTuongThue"]);
                    vSlist[vSlist.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(details.Rows[i]["MaSoThue"]);
                    vSlist[vSlist.Rows.Count - 1, 14] = RuntimeHelpers.GetObjectValue(details.Rows[i]["DiaChiThue"]);
                    vSlist[vSlist.Rows.Count - 1, 15] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoSeri"]);
                    vSlist[vSlist.Rows.Count - 1, 0x10] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoHoaDon"]);
                    vSlist[vSlist.Rows.Count - 1, 0x11] = RuntimeHelpers.GetObjectValue(details.Rows[i]["NgayHoaDon"]);
                    vSlist[vSlist.Rows.Count - 1, 0x12] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaLoaiThue"]);
                    vSlist[vSlist.Rows.Count - 1, 0x13] = RuntimeHelpers.GetObjectValue(details.Rows[i]["LoaiHoaDon"]);
                    vSlist[vSlist.Rows.Count - 1, 20] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TyLeThue"]);
                    vSlist[vSlist.Rows.Count - 1, 0x15] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TienThueNT"]);
                    vSlist[vSlist.Rows.Count - 1, 0x16] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TienThue"]);
                    vSlist[vSlist.Rows.Count - 1, 0x17] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaBoPhan"]);
                    vSlist[vSlist.Rows.Count - 1, 0x18] = RuntimeHelpers.GetObjectValue(details.Rows[i]["BoPhan"]);
                    vSlist[vSlist.Rows.Count - 1, 0x19] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaSanPham"]);
                    vSlist[vSlist.Rows.Count - 1, 0x1a] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SanPham"]);
                    vSlist[vSlist.Rows.Count - 1, 0x1b] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaHopDong"]);
                    vSlist[vSlist.Rows.Count - 1, 0x1c] = RuntimeHelpers.GetObjectValue(details.Rows[i]["HopDong"]);
                    vSlist[vSlist.Rows.Count - 1, 0x1d] = "";
                    vSlist[vSlist.Rows.Count - 1, 30] = "";
                    vSlist[vSlist.Rows.Count - 1, 0x1f] = RuntimeHelpers.GetObjectValue(details.Rows[i]["DienGiai"]);
                }
                vSlist = null;
            }
        }

        public bool SaveDetails()
        {
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    vSlist[i, 0] = modGeneral.CreatKey("FA_GhiTangTaiSanChiTiet", 15, "");
                }
                this.objCTTTS.Khoa = Conversions.ToString(vSlist[i, 0]);
                this.objCTTTS.KhoaChungTu = this.cFrmKhoa;
                this.objCTTTS.KhoaTaiKhoanNo = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaTaiKhoanCo = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 5]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaDoiTuong = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaBoPhan = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x17]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaSanPham = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x19]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaHopDong = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x1b]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
                this.objCTTTS.TyGia = Conversions.ToDouble(this.txtTyGia.Value);
                this.objCTTTS.SoTienNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 7]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCTTTS.SoTien = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 8]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCTTTS.DienGiai = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x1f]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaTaiKhoanThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 9]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaDoiTuongThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 11]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.TenDoiTuongThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 12]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.MaSoThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 13]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.DiaChiThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 14]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.KhoaLoaiThue = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x12]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.TyLeThue = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 20]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCTTTS.TienThue = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x15]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCTTTS.TienThueNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x16]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCTTTS.SoHoaDon = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x10]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.objCTTTS.NgayHoaDon = LVYModule.Date2Char(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x11]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim());
                this.objCTTTS.SoSeri = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 15]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (!this.objCTTTS.Save())
                {
                    return false;
                }
            }
            vSlist = null;
            return true;
        }

        public void ShowData(object pKhoa)
        {
            this.objTTS.Load(Conversions.ToString(pKhoa), 0);
            this.cFrmKhoa = this.objTTS.Khoa;
            this.TxtSoChungTu.Text = this.objTTS.SoChungTu;
            this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objTTS.NgayChungTu);
            this.TxtDienGiai.Text = this.objTTS.DienGiai;
            this.CboLyDoGiam.SelectedValue = RuntimeHelpers.GetObjectValue(this.objTTS.KhoaLyDo);
            this.CboLoaiDuLieu.SelectedValue = this.objTTS.DuLieu;
            this.cFrmKhoaTaiSan = this.objTTS.KhoaTaiSanCoDinh;
            this.objTS.Load(this.cFrmKhoaTaiSan);
            this.TxtMaTaiSan.Text = this.objTS.Ma;
            this.TxtSoHieu.Text = this.objTS.SoHieuTaiSan;
            this.CboLoaiTien.SelectedValue = this.objTS.LoaiTien;
            this.txtTyGia.Value = this.objTS.TyGia;
            if (modGeneral.H_LANGUAGE.ToUpper().Trim() == "VIET")
            {
                this.TxtTenTaiSan.Text = this.objTS.TenViet;
            }
            else
            {
                this.TxtTenTaiSan.Text = this.objTS.TenAnh;
            }
            this.TxtNguyenGia.Value = this.objTS.NguyenGia;
            this.TxtNguyenGiaNT.Value = this.objTS.NguyenGiaNT;
            this.TxtDaKhauHao.Value = this.objTS.DaKhauHao;
            this.TxtConLai.Value = this.objTS.GiaTriConLai;
            this.TxtThoiGianSuDung.Value = this.objTS.ThoiGianSuDung;
            this.txtTriGiaKhauHao.Value = this.objTS.TriGiaKhauHao;
            this.AdvTKNguyenGia.Value = this.objTS.KhoaTKNguyenGia;
            this.AdvTKChiPhi.Value = this.objTS.KhoaTKChiPhi;
            this.AdvTKKhauHao.Value = this.objTS.KhoaTKKhauHao;
            this.txtTongNguyenGiaNT.Value = this.objTTS.TongTienNT;
            this.TxtTongNguyenGia.Value = this.objTTS.TongTien;
            this.TxtTongThueNT.Value = this.objTTS.TongThueNT;
            this.TxtTongThue.Value = this.objTTS.TongThue;
            this.LoadDetails(this.cFrmKhoa);
            this.CmdAdd.Enabled = false;
            this.CmdEdit.Enabled = true & this.mAllowEdit;
        }

        public void TotalOfVoucher()
        {
            double num2 = LVYModule.SumColGrid(this.VSlist, 7);
            double num = LVYModule.SumColGrid(this.VSlist, 8);
            this.txtTongNguyenGiaNT.Value = num2;
            this.TxtTongNguyenGia.Value = num;
            this.TxtTongThueNT.Value = LVYModule.SumColGrid(this.VSlist, 0x15);
            this.TxtTongThue.Value = LVYModule.SumColGrid(this.VSlist, 0x16);
        }

        private void TxtNgayChungTu_LostFocus(object sender, EventArgs e)
        {
            this.objSoCT.Load(this.mLoaiChungTu);
            this.TxtSoChungTu.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6), 1);
        }

        public object UpdateData()
        {
            object obj2;
            FA_GhiTangGiamTaiSan objTTS = this.objTTS;
            objTTS.Khoa = this.cFrmKhoa;
            objTTS.KhoaTaiSanCoDinh = this.cFrmKhoaTaiSan;
            objTTS.SoChungTu = this.TxtSoChungTu.Text;
            objTTS.NgayChungTu = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            objTTS.KhoaLyDo = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLyDoGiam.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            objTTS.DienGiai = this.TxtDienGiai.Text.Trim();
            objTTS.LoaiTien = this.CboLoaiTien.SelectedValue.ToString().Trim();
            objTTS.TyGia = Conversions.ToDouble(this.txtTyGia.Value);
            objTTS.NguyenGiaNT = Conversions.ToDouble(this.TxtNguyenGiaNT.Value);
            objTTS.NguyenGia = Conversions.ToDouble(this.TxtNguyenGia.Value);
            objTTS.DaKhauHao = Conversions.ToDouble(this.TxtDaKhauHao.Value);
            objTTS.TriGiaConLai = Conversions.ToDouble(this.TxtConLai.Value);
            objTTS.SoThangKhauHao = Conversions.ToInteger(this.TxtThoiGianSuDung.Value);
            objTTS.TriGiaKhauHao = Conversions.ToDouble(this.txtTriGiaKhauHao.Value);
            objTTS.KhoaDonVi = modGeneral.H_CLIENT;
            objTTS.Send = 0;
            objTTS.TongTienNT = Conversions.ToDouble(this.txtTongNguyenGiaNT.Value);
            objTTS.TongTien = Conversions.ToDouble(this.TxtTongNguyenGia.Value);
            objTTS.TongThueNT = Conversions.ToDouble(this.TxtTongThueNT.Value);
            objTTS.TongThue = Conversions.ToDouble(this.TxtTongThue.Value);
            objTTS.DuLieu = Conversions.ToString(this.CboLoaiDuLieu.SelectedValue);
            return objTTS.Save();
            objTTS = null;
            return obj2;
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            double num = 0.0;
            double num3 = 0.0;
            int num4 = 0;
            double num2 = 0.0;
            switch (e.Col)
            {
                case 7:
                    num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 7]), 0, modGeneral.TypeOfValue.Nothing));
                    num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    this.VSlist[e.Row, 8] = num * num3;
                    break;

                case 0x13:
                case 20:
                    num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 7]), 0, modGeneral.TypeOfValue.Nothing));
                    num4 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 20]), 0, modGeneral.TypeOfValue.Nothing));
                    num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    num2 = Math.Round((double) ((num * num4) / 100.0), 0);
                    this.VSlist[e.Row, 0x15] = num2;
                    this.VSlist[e.Row, 0x16] = num2 * num3;
                    this.TotalOfVoucher();
                    break;

                case 0x15:
                    num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 0x16]), 0, modGeneral.TypeOfValue.Nothing));
                    num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                    this.VSlist[e.Row, 0x16] = num2 * num3;
                    this.TotalOfVoucher();
                    break;
            }
        }

        private void VSlist_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (!this.mEnabledControl)
            {
                e.Cancel = true;
            }
            else if (e.Col == 4)
            {
                clsDMTaiKhoan khoan = new clsDMTaiKhoan();
                khoan.Load(this.VSlist[e.Row, 1].ToString().Trim());
                if ((((khoan.DoiTuongCungCap + khoan.DoiTuongKhachHang) + khoan.DoiTuongNganHang) + khoan.DoiTuongNhanVien) == 0)
                {
                    e.Cancel = true;
                }
            }
        }

        private void VSlist_CellButtonClick(object sender, RowColEventArgs e)
        {
            object obj2;
            string expression = "";
            switch (e.Col)
            {
                case 2:
                    expression = SearchModule.SearchTaiKhoan("", "", "", " LEFT(SoTaiKhoan,3) IN ('111', '112','131','811','214','431','222','466')", "");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 1] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 2] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    }
                    return;

                case 3:
                case 5:
                case 7:
                case 8:
                case 9:
                case 11:
                case 13:
                case 14:
                case 15:
                case 0x10:
                case 0x11:
                case 0x12:
                case 20:
                case 0x15:
                case 0x16:
                case 0x17:
                case 0x19:
                case 0x1b:
                case 0x1d:
                    return;

                case 4:
                {
                    clsDMTaiKhoan khoan = new clsDMTaiKhoan();
                    khoan.Load(Conversions.ToString(this.VSlist[e.Row, 1]));
                    if (!((((khoan.DoiTuongCungCap == 0) & (khoan.DoiTuongKhachHang == 0)) & (khoan.DoiTuongNganHang == 0)) & (khoan.DoiTuongNhanVien == 0)))
                    {
                        if (khoan.DoiTuongCungCap == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "S", "");
                        }
                        else if (khoan.DoiTuongKhachHang == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "C", "");
                        }
                        else if (khoan.DoiTuongNganHang == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "B", "");
                        }
                        else if (khoan.DoiTuongNhanVien == 1)
                        {
                            expression = SearchModule.SearchDoiTuong("", "E", "");
                        }
                        break;
                    }
                    expression = SearchModule.SearchDoiTuong("", "", "");
                    break;
                }
                case 6:
                    expression = SearchModule.SearchTaiKhoan("", "", "", " LEFT(SoTaiKhoan,3) IN ('711', '211','431','111','112','338', '138')", "");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 5] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 6] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    }
                    return;

                case 10:
                    expression = SearchModule.SearchTaiKhoan("", "", "", " LEFT(SoTaiKhoan,3) IN ('133', '333')", "");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 9] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 10] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        this.FillDoiTuongThue(Conversions.ToString(this.VSlist[e.Row, 5]), e.Row);
                    }
                    return;

                case 12:
                    expression = Conversions.ToString(SearchModule.SearchDoiTuongThue(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 13]), "", modGeneral.TypeOfValue.Nothing).ToString(), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 14]), "", modGeneral.TypeOfValue.Nothing).ToString(), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 15]), "", modGeneral.TypeOfValue.Nothing).ToString(), ""));
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 13] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 14] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        this.VSlist[e.Row, 15] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                        this.VSlist.Select(e.Row, 0x10);
                    }
                    return;

                case 0x13:
                {
                    clsDMLoaiHoaDon don = new clsDMLoaiHoaDon();
                    obj2 = LVYModule.ShowMultiDropDownBySource(this.VSlist, e.Row, e.Col, don.ShowListByField("Khoa|Ma|Ten" + modGeneral.H_LANGUAGE + "|TyLeThue", "", " LoaiPhatSinh Desc, Ma"), 10, 0, Conversions.ToString(1), "");
                    if (obj2 == null)
                    {
                        goto Label_0721;
                    }
                    if (NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null).ToString().Trim() != "")
                    {
                        this.VSlist[e.Row, 0x12] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x13] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                        this.VSlist[e.Row, 20] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 3 }, null));
                        goto Label_0721;
                    }
                    return;
                }
                case 0x18:
                    expression = SearchModule.SearchDepartment("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x17] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x18] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    }
                    return;

                case 0x1a:
                    expression = SearchModule.SearchProduct("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x19] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x1a] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    }
                    return;

                case 0x1c:
                    expression = SearchModule.SearchContact("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x1b] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 0x1c] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 1 }, null));
                    }
                    return;

                case 30:
                    expression = SearchModule.SearchCosting("");
                    if (expression != "")
                    {
                        obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                        this.VSlist[e.Row, 0x1d] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                        this.VSlist[e.Row, 30] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
                    }
                    return;

                default:
                    return;
            }
            if (expression != "")
            {
                obj2 = Strings.Split(expression, "|", -1, CompareMethod.Binary);
                this.VSlist[e.Row, 3] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 0 }, null));
                this.VSlist[e.Row, 4] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(obj2, new object[] { 2 }, null));
            }
            return;
        Label_0721:
            this.VSlist_AfterEdit(RuntimeHelpers.GetObjectValue(sender), e);
        }

        internal virtual ADVAccount AdvTKChiPhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKChiPhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKChiPhi = value;
            }
        }

        internal virtual ADVAccount AdvTKKhauHao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKKhauHao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKKhauHao = value;
            }
        }

        internal virtual ADVAccount AdvTKNguyenGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKNguyenGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKNguyenGia = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.C1DockingTab1_SelectedIndexChanged);
                if (this._C1DockingTab1 != null)
                {
                    this._C1DockingTab1.SelectedIndexChanged -= handler;
                }
                this._C1DockingTab1 = value;
                if (this._C1DockingTab1 != null)
                {
                    this._C1DockingTab1.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab3 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage3 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage4 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage5 = value;
            }
        }

        internal virtual ComboBox CboLoaiDuLieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiDuLieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiDuLieu = value;
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiTien = value;
            }
        }

        internal virtual ComboBox CboLyDoGiam
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLyDoGiam;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLyDoGiam = value;
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRow_Click);
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click -= handler;
                }
                this._CmdAddRow = value;
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click += handler;
                }
            }
        }

        internal virtual Button CmdChuyen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdChuyen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdChuyen = value;
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual Button CmdDelRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRow_Click);
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click -= handler;
                }
                this._CmdDelRow = value;
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdFind_Click);
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click -= handler;
                }
                this._CmdFind = value;
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdPrint = value;
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual Button CmdTimTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdTimTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdTimTaiSan_Click);
                if (this._CmdTimTaiSan != null)
                {
                    this._CmdTimTaiSan.Click -= handler;
                }
                this._CmdTimTaiSan = value;
                if (this._CmdTimTaiSan != null)
                {
                    this._CmdTimTaiSan.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnabledControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdFind.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CmdPrint.Enabled = !value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdAddRow.Enabled = value;
                this.CmdDelRow.Enabled = value;
                this.TxtSoChungTu.ReadOnly = !value;
                this.TxtNgayChungTu.Enabled = value;
                this.TxtDienGiai.ReadOnly = !value;
                this.CboLyDoGiam.Enabled = value;
                this.CboLoaiDuLieu.Enabled = value;
                this.CmdChuyen.Enabled = !value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label17
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label17;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label17 = value;
            }
        }

        internal virtual Label Label18
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label18;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label18 = value;
            }
        }

        internal virtual Label Label19
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label19;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label19 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label20
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label20;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label20 = value;
            }
        }

        internal virtual Label Label24
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label24;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label24 = value;
            }
        }

        internal virtual Label Label27
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label27;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label27 = value;
            }
        }

        internal virtual Label Label28
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label28;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label28 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual Panel Panel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel4 = value;
            }
        }

        internal virtual Panel PNDungChung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PNDungChung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PNDungChung = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripButton ToolStripButton2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual C1NumericEdit TxtConLai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtConLai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtConLai = value;
            }
        }

        internal virtual C1NumericEdit TxtDaKhauHao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDaKhauHao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDaKhauHao = value;
            }
        }

        internal virtual TextBox TxtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDienGiai = value;
            }
        }

        internal virtual TextBox TxtMaTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMaTaiSan = value;
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtNgayChungTu_LostFocus);
                if (this._TxtNgayChungTu != null)
                {
                    this._TxtNgayChungTu.LostFocus -= handler;
                }
                this._TxtNgayChungTu = value;
                if (this._TxtNgayChungTu != null)
                {
                    this._TxtNgayChungTu.LostFocus += handler;
                }
            }
        }

        internal virtual DateTimePicker TxtNgayHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayHoaDon = value;
            }
        }

        internal virtual C1NumericEdit TxtNguyenGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguyenGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguyenGia = value;
            }
        }

        internal virtual C1NumericEdit TxtNguyenGiaNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguyenGiaNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguyenGiaNT = value;
            }
        }

        internal virtual TextBox TxtSoChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoChungTu = value;
            }
        }

        internal virtual TextBox TxtSoHieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoHieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoHieu = value;
            }
        }

        internal virtual TextBox TxtTenTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenTaiSan = value;
            }
        }

        internal virtual C1NumericEdit TxtThoiGianSuDung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtThoiGianSuDung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtThoiGianSuDung = value;
            }
        }

        internal virtual C1NumericEdit TxtTongNguyenGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongNguyenGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongNguyenGia = value;
            }
        }

        internal virtual C1NumericEdit txtTongNguyenGiaNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTongNguyenGiaNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTongNguyenGiaNT = value;
            }
        }

        internal virtual C1NumericEdit TxtTongThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongThue = value;
            }
        }

        internal virtual C1NumericEdit TxtTongThueNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongThueNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongThueNT = value;
            }
        }

        internal virtual C1NumericEdit txtTriGiaKhauHao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTriGiaKhauHao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTriGiaKhauHao = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_AfterEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSlist_CellButtonClick);
                RowColEventHandler handler3 = new RowColEventHandler(this.VSlist_BeforeEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit -= handler;
                    this._VSlist.CellButtonClick -= handler2;
                    this._VSlist.BeforeEdit -= handler3;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit += handler;
                    this._VSlist.CellButtonClick += handler2;
                    this._VSlist.BeforeEdit += handler3;
                }
            }
        }
    }
}

